package com.edfu.core.testmgt.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;

import javax.xml.bind.annotation.XmlRootElement;

import com.edfu.core.identitymgt.vo.User;

@XmlRootElement (name = "UserTest")
public class UserTest implements Serializable {

	private static final long serialVersionUID = 4933946333515859668L;
	
	private long id;
	private Test test;
	private User user;
	private Date subscribedDate;
	private Date testDate;
	private boolean present;
	private double percentage;
	private boolean pass;
	private String grade;
	private boolean unsubscribe;
	private Map<Long, ArrayList<Long>> userAnswers;
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	public Test getTest() {
		return test;
	}
	public void setTest(Test test) {
		this.test = test;
	}
	
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	public Date getSubscribedDate() {
		return subscribedDate;
	}
	public void setSubscribedDate(Date subscribedDate) {
		this.subscribedDate = subscribedDate;
	}
	
	public Date getTestDate() {
		return testDate;
	}
	public void setTestDate(Date testDate) {
		this.testDate = testDate;
	}
	
	public boolean isPresent() {
		return present;
	}
	public void setPresent(boolean present) {
		this.present = present;
	}
	
	public double getPercentage() {
		return percentage;
	}
	public void setPercentage(double percentage) {
		this.percentage = percentage;
	}
	
	public boolean isPass() {
		return pass;
	}
	public void setPass(boolean pass) {
		this.pass = pass;
	}
	
	public String getGrade() {
		return grade;
	}
	public void setGrade(String grade) {
		this.grade = grade;
	}
	
	public boolean isUnsubscribe() {
		return unsubscribe;
	}
	public void setUnsubscribe(boolean unsubscribe) {
		this.unsubscribe = unsubscribe;
	}
	
	public Map<Long, ArrayList<Long>> getUserAnswers() {
		return userAnswers;
	}
	public void setUserAnswers(Map<Long, ArrayList<Long>> userAnswers) {
		this.userAnswers = userAnswers;
	}
	
	@Override
	public String toString() {
		return "UserTest [test=" + test + ", user=" + user + "]";
	}	

}
